﻿using System;

namespace Useful.Document
{
    public class PdfBatchPrinter : BasePdfBatchPrinter
    {
        protected const string comPrinterSettingsName = "Bullzip.PdfSettings";
        protected const string comPrinterUtilName = "Bullzip.PdfUtil";

        public PdfBatchPrinter(string gilyash)
            : base(gilyash)
        {
            Init();
        }

        protected override void CreateComObj()
        {
            PDFPrinterSettingsType = Type.GetTypeFromProgID(comPrinterSettingsName);
            com_appPrinterSettings = Activator.CreateInstance(PDFPrinterSettingsType);

            PDFPrinterUtilType = Type.GetTypeFromProgID(comPrinterUtilName);
            com_appPrinterUtil = Activator.CreateInstance(PDFPrinterUtilType);
        }

        protected override string GetLocalFileName(string file, bool includeHostName)
        {
            return GetFileName(file);
        }

        public override void Dispose()
        {
        }
    }
}
